<<<<<<< HEAD
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/showCartoon/jquery-3.2.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/showCartoon/jquery.dataTables.css" >
<script type="text/javascript" src="${pageContext.request.contextPath}/js/showCartoon/jquery.dataTables.js"></script>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/showCartoon/bootstrap-3.3.7-dist/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/showCartoon/bootstrap-3.3.7-dist/css/bootstrap-theme.min.css">
<script type="text/javascript" src="${pageContext.request.contextPath}/js/showCartoon/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/showCartoon/bootbox.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/showCartoon/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript">
var aa=null;
	$(function(){
		mydatatables();
		$("#selecTT").click(function(){
			mydatatables();
		});
	})

	function delect(id){
		bootbox.confirm({
		    message: "确定要删除吗？",
		    buttons: {
		        confirm: {
		            label: 'Yes',
		            className: 'btn-success'
		        },
		        cancel: {
		            label: 'No',
		            className: 'btn-danger'
		        }
		    },
		    callback: function (result) {
		       if(result==true){
		    	   $.ajax({
		   			url:"${pageContext.request.contextPath}/project/doDeletPorjectById.do",
		   			data:{
		   				"id":id,
		   			},
		   			dataType:"json",
		   			success:function(result){
		   				if(result.state=="1"){
		   					aa.draw(false);
		   				}
		   				bootbox.alert({
		   				    message:result.hint,
		   				    size: 'small'
		   				});
		   			}
		   		})
		       }
		    }
		});
	}
	function update(pid,tid){
		$.ajax({
			url:"${pageContext.request.contextPath}/project/toPorjectUpdate.do",
			data:{
				"pid":pid,
				"tid":tid
			},
			success:function(result){
				bootbox.dialog({
				    title: '漫画修改',
				    message:result
				});		
			}
		})
/* 		 window.location.href="?id="+id; */
	}
	function add(){
		$.ajax({
			url:"${pageContext.request.contextPath}/project/toPorjectAdd.do",
			success:function(result){
				bootbox.dialog({
				    title: '漫画添加',
				    message:result
				});		
			}
		})
	}

	function mydatatables(){
		if(aa!=null){
			aa.destroy();
		}
		aa=$("#myTable").DataTable( {
			"lengthMenu": [[5, 10, 25], [5, 10, 25]],
			language:{
				url:"${pageContext.request.contextPath}/json/Chinese.json",
		    },
		    serverSide: true,
		    paging:true,
			searching:false,
			ordering:false,
		    ajax: {
		        url: "${pageContext.request.contextPath}/cartoon_doshowCartoonList.action",
		        dataSrc: 'data',
		        type:"post",
		        data:{
		        	cartoonname:$("#cartoonname").val(),
		        }
		    },
		    columns: [
				{data:"cartoonid"},
				{data:"carurl",render:function ( data, type, row ) {
			        return "<img  src='${pageContext.request.contextPath}/"+row.carurl+"' width='50px' height='70px'>";
			    }},
				{data:"cartoonname"},
				{data:"carurl"},
				{data:"cartype"},
				{data:["cartoonid"],render:function ( data, type, row ) {
			        return "<a href='javascript:delect(\""+row.cartoonid+"\")'>删除</a>||<a href='javascript:update(\""+row.cartoonid+"\")'>修改</a>";
			    }}
		    ]
		} );
	}
</script>
<style type="text/css">
	td {  
    	text-align:center;  
    }  
</style>
</head>
<body>
漫画名称:<input type="text" name="cartoonDO.cartoonname" id="cartoonname"/> 
<input type="button" id="selecTT" value="搜索"/>
	<table border="1" id="myTable" align="center">
		<thead>
			<tr>
			<td>漫画id</td><td>漫画封面</td><td>漫画名字</td><td>封面地址</td><td>漫画的类型</td><td>操作</td>
			</tr>
		</thead>
		<tbody>
		</tbody>
	</table>
	<a href="javaScript:add()">漫画添加</a>
</body>
=======
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/showCartoon/jquery-3.2.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/showCartoon/jquery.dataTables.css" >
<script type="text/javascript" src="${pageContext.request.contextPath}/js/showCartoon/jquery.dataTables.js"></script>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/showCartoon/bootstrap-3.3.7-dist/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/showCartoon/bootstrap-3.3.7-dist/css/bootstrap-theme.min.css">
<script type="text/javascript" src="${pageContext.request.contextPath}/js/showCartoon/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/showCartoon/bootbox.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/showCartoon/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript">
var aa=null;
	$(function(){
		mydatatables();
		$("#selecTT").click(function(){
			mydatatables();
		});
	})

	function delect(id){
		bootbox.confirm({
		    message: "确定要删除吗？",
		    buttons: {
		        confirm: {
		            label: 'Yes',
		            className: 'btn-success'
		        },
		        cancel: {
		            label: 'No',
		            className: 'btn-danger'
		        }
		    },
		    callback: function (result) {
		       if(result==true){
		    	   $.ajax({
		   			url:"${pageContext.request.contextPath}/project/doDeletPorjectById.do",
		   			data:{
		   				"id":id,
		   			},
		   			dataType:"json",
		   			success:function(result){
		   				if(result.state=="1"){
		   					aa.draw(false);
		   				}
		   				bootbox.alert({
		   				    message:result.hint,
		   				    size: 'small'
		   				});
		   			}
		   		})
		       }
		    }
		});
	}
	function update(pid,tid){
		$.ajax({
			url:"${pageContext.request.contextPath}/project/toPorjectUpdate.do",
			data:{
				"pid":pid,
				"tid":tid
			},
			success:function(result){
				bootbox.dialog({
				    title: '漫画修改',
				    message:result
				});		
			}
		})
/* 		 window.location.href="?id="+id; */
	}
	function add(){
		$.ajax({
			url:"${pageContext.request.contextPath}/tologin.action",
			success:function(result){
				bootbox.dialog({
				    title: '漫画添加',
				    message:result
				});		
			}
		})
	}

	function mydatatables(){
		if(aa!=null){
			aa.destroy();
		}
		aa=$("#myTable").DataTable( {
			"lengthMenu": [[5, 10, 25], [5, 10, 25]],
			language:{
				url:"${pageContext.request.contextPath}/json/Chinese.json",
		    },
		    serverSide: true,
		    paging:true,
			searching:false,
			ordering:false,
		    ajax: {
		        url: "${pageContext.request.contextPath}/cartoon_doshowCartoonList.action",
		        dataSrc: 'data',
		        type:"post",
		        data:{
		        	cartoonname:$("#cartoonname").val(),
		        }
		    },
		    columns: [
				{data:"cartoonid"},
				{data:"carurl",render:function ( data, type, row ) {
			        return "<img  src='${pageContext.request.contextPath}/"+row.carurl+"' width='50px' height='70px'>";
			    }},
				{data:"cartoonname"},
				{data:"carurl"},
				{data:"cartype"},
				{data:["cartoonid"],render:function ( data, type, row ) {
			        return "<a href='javascript:delect(\""+row.cartoonid+"\")'>删除</a>||<a href='javascript:update(\""+row.cartoonid+"\")'>修改</a>";
			    }}
		    ]
		} );
	}
</script>
<style type="text/css">
	td {  
    	text-align:center;  
    }  
</style>
</head>
<body>
漫画名称:<input type="text" name="cartoonDO.cartoonname" id="cartoonname"/> 
<input type="button" id="selecTT" value="搜索"/>
	<table border="1" id="myTable" align="center">
		<thead>
			<tr>
			<td>漫画id</td><td>漫画封面</td><td>漫画名字</td><td>封面地址</td><td>漫画的类型</td><td>操作</td>
			</tr>
		</thead>
		<tbody>
		</tbody>
	</table>
	<a href="javaScript:add()">漫画添加</a>
</body>
>>>>>>> dev
</html>